package kr.hkit.powerjava.chapter1314;

import java.awt.FlowLayout;
import java.awt.HeadlessException;

import javax.swing.JButton;
import javax.swing.JFrame;

class MyFrame extends JFrame {

	public MyFrame() throws HeadlessException {
		setSize(300, 200);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setTitle("MyFrame");
		
		setLayout(new FlowLayout());
		JButton button = new JButton("버튼");
		this.add(button);
		setVisible(true);
		pack();
	}
	
}

public class MyFrameTest1 {
	public static void main(String[] args) {
		MyFrame f = new MyFrame();
	}
}
